﻿<Window x:Class="GuiLayer.ApVerhuurd"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ApVerhuurd" Height="344.681" Width="445.532"
         DataContext = "{Binding RelativeSource={RelativeSource Self}}">
    <Window.Resources>
        <CollectionViewSource x:Name="MyCollection" x:Key="verhuurdViewSource" Source="{Binding Path=Verhuurd, Source={x:Static Application.Current}}">
        </CollectionViewSource>
    </Window.Resources>
    <Grid DataContext="{Binding VerhuurdLijst}" Margin="0, 0, 0, 13">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="40*"/>
            <ColumnDefinition Width="179*"/>
        </Grid.ColumnDefinitions>
        <ListView Grid.Row="0" Margin="10,10,10,120"  Grid.ColumnSpan="2" ItemsSource="{Binding}" SelectionMode="Single" >
            <ListView.View >
            <GridView>
                <GridViewColumn x:Name="VoertuigID" Header="Voertuig ID" Width="50">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding VoertuigID}"></TextBox>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn>
                <GridViewColumn x:Name="FiliaalNr" Header="Filiaal Nr" Width="100">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding FiliaalNr}"></TextBox>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn>
                <GridViewColumn x:Name="Klantnr" Header="Klant Nr" Width="100">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding Klantnr}"></TextBox>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn>
                <GridViewColumn x:Name="Start" Header="Start" Width="100">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding Start}"></TextBox>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn>
                <GridViewColumn x:Name="Duur" Header="Duur" Width="100">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding Duur}"></TextBox>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn>                
            </GridView>
        </ListView.View>
        </ListView>
        <Button x:Name="btnTerug" Content="Terug" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="10,186,0,0" Grid.ColumnSpan="2" Click="btnTerug_Click"/>

    </Grid>
</Window>
